Repository navigation
feat(ai-red-teaming): natural-language severity policy on generate_attack - #167
Merged
Merged
Conversation
…tack Let users express a risk taxonomy in natural language and have the agent adopt it: generate_attack now accepts an optional `severity_policy` (thresholds / matrix / aliases / replace / default_row) validated by `_validate_severity_policy`, threaded through config into the generated Assessment(severity_policy=...) call (the SDK folds it into attacker_config; the platform validates + applies it to findings). - tools/attacks.py: new severity_policy arg with LLM-facing docstring. - scripts/attack_runner.py: validate + emit into generated workflow. - skills/workflow-patterns: Pattern 9 shows compiling NL intent into a policy. - tests: validator + generated-script + rejection coverage. - capability.yaml: 1.17.6 -> 1.18.0 (additive public surface).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lets users express a risk taxonomy in natural language and have the AIRT agent adopt it.
generate_attacknow accepts an optionalseverity_policythat is validated, threaded through config, and emitted into the generatedAssessment(severity_policy=...)call.severity_policyarg with an LLM-facing docstring (keys:thresholds,matrix,aliases,replace,default_row)._validate_severity_policy(fail-fast, mirrors the platform schema) + emitseverity_policy=into the workflow.severity_policy=, invalid policy rejected.Depends on
SeverityPolicy+ SDKAssessment(severity_policy=...)). The SDK folds the dict intoattacker_config; the platform validates + applies it to finding severities.Test plan
uv run --script capabilities/ai-red-teaming/tests/test_attack_runner.py(severity tests pass)🤖 Generated with Claude Code